<extend name="Bbs/base"/>
<block name="bbs">
    <div class="bbs-left">
        <div class="faq-title-msg">
            <p>每天，你都可以在这儿遇见 @ ta. &nbsp;&nbsp;<a href="#newQuestion" class="newQuestion">新建问答</a>
            </p>
        </div>
        <ul class="faq-nav clearfix">
            <li><a href="{:U('/bbs/'.$org['id'])}">最新</a></li>
            <li><a href="{:U('/elite/'.$org['id'])}">精华</a></li>
            <li class="active"><a href="{:U('/docs/'.$org['id'])}"> Docs. </a></li>
        </ul>
        <ul class="faq-container">
            <ul class="doc-lists">
                <if condition="$list">
                    <volist name="list" id="vo">
                        <li>
                            <a href="{:U('/doc/'.$vo['id'])}" class="con-cover"><img src="//img.wooo.wang/{$vo.img}" title="{$vo.name}"></a>
                            <div class="con-book-info">
                                <h3><a href="{:U('/doc/'.$vo['id'])}">{$vo.name}<if condition="$vo.status eq -1"><span class="red"> 「冻结中」</span></if></a></h3>
                                <p>{$vo.desc}</p>
                                <div class="con-book-footer">
                                    <span class="icon-star" title="收藏数"></span> {$vo.collect} &nbsp;<span class="icon-pencil" title="修改次数"></span> {$vo.change} &nbsp;<span class="icon-time" title="创建时间"></span> {$vo.create|date="Y-m-d",###}
                                </div>
                            </div>
                        </li>
                    </volist>
                    <else />
                    <p class="no-msg">本社区暂未创建文档！</p>
                </if>
                {$page}
            </ul>
        </ul>
        <div class="book-comment">
            <h2><a name="newQuestion">发布问答</a></h2>
            <form action="{:U('/bbs/publish')}" method="POST" class="form faq" id="form">
                <div class="form-item input-select hide" id="titleSec">
                    <input type="hidden" name="oid" value="{$org.id}">
                    <input type="hidden" name="html" id="htmlContent">
                    <div class="select">
                        <input type="hidden" name="type" id="selectVal" value="1">
                        <span class="selectText" id="selectBtn">问答</span>
                        <ul class="hide" id="selectSec">
                            <li val="1">问答</li>
                            <!--<li val="2">审议</li>-->
                        </ul>
                        <span class="icon-read"></span>
                    </div>
                    <input type="text" name="title" id="title" tabindex="1" placeholder="请填写标题...">
                    <p></p>
                </div>
                <div class="form-item form-md">
                    <div class="md-tools clearfix hide" id="contentNav">
                        <a href="javascript:void(0)" id="imgBtn"><span class="icon-img"></span></a>
                        <a href="javascript:void(0)" id="helpBtn"><span class="icon-help"></span></a>
                        <a href="javascript:void(0)" id="previewBtn" class="right"><span class="icon-eye"></span></a>
                        <!-- <a href="javascript:void(0)" id="full" class="right"><span class="icon-full"></span></a> -->
                    </div>
                    <textarea id="content" spellcheck="false" tabindex="2"></textarea>
                    <p></p>
                    <div class="md-preview wooo" id="shadeSec"></div>
                </div>
                <div class="form-item form-button clearfix hide" id="submitSec">
                    <p class="sendTip">祝你今天愉悦好心情!</p>
                    <button class="md-button" id="submitBtn">提交问题</button>
                </div>
            </form>
        </div>
    </div>
</block>
<block name="js">
    <script>
        var token = "{$token}", uid = {:UID}, oid = {$org.id};
    </script>
    <script src="__STATIC__/doc/js/publish.js?v=__VERSION__"></script>
</block>